#!/bin/bash

SrcDir=$1
DstDir=$2

for filename in $SrcDir/*.TIFF; do
    echo "Ready to split $filename."
    DirName=`basename -s .TIFF $filename`
    echo "Make target folder $DirName"
    mkdir $DstDir/$DirName
    ./TIFFImageSplitter $filename $DstDir/$DirName
done
